<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="ICollectionView,mx.collections.ICollectionView,filterFunction,length,sort,contains,createCursor,disableAutoUpdate,enableAutoUpdate,itemUpdated,refresh" name="keywords">
<title>mx.collections.ICollectionView</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ICollectionView - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mx/collections/ICollectionView.html&amp;mx/collections/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Interface&nbsp;ICollectionView</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Interface ICollectionView"); titleBar_setSubNav(false,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.collections</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Interface</td><td class="classSignature">public interface ICollectionView extends <a href="none">flash.events.IEventDispatcher</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implementors</td><td><a href="../collections/ListCollectionView.html">ListCollectionView</a></td>
</tr>
</table>
<p></p>
  An <code>ICollectionView</code> is a view onto a collection of data.
  The view can be modified to show the data sorted according to various
  criteria or reduced by filters without modifying the underlying data.
  An IViewCursor provides to access items within a
  collection. You can modify the collection by using the IViewCursor
  interface <code>insert()</code> and <code>remove()</code> methods.
   <p>An <code>ICollectionView</code> may be a view onto data that has been
  retrieved from a remote location.
  When Implementing this interface for data
  that may be remote it is important to handle the case where data
  may not yet be available, which is indicated by the
  <code>ItemPendingError</code>.</p>
   <p>The <code>IList</code> interface is an alternative to the
  <code>ICollectionView</code> interface.</p>
   <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../collections/IViewCursor.html" target="">mx.collections.IViewCursor</a>
<br>
<a href="errors/ItemPendingError.html" target="">mx.collections.errors.ItemPendingError</a>
<br>
<a href="../collections/IList.html" target="">mx.collections.IList</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#filterFunction">filterFunction</a> : Function<div class="summaryTableDescription">
      A function that the view will use to eliminate items that do not
      match the function's criteria.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#length">length</a> : int<div class="summaryTableDescription">[read-only]
      The number of items in this view.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#sort">sort</a> : <a href="../collections/Sort.html">Sort</a>
<div class="summaryTableDescription">
      The Sort that will be applied to the ICollectionView.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#contains()">contains</a>(item:Object):Boolean</div>
<div class="summaryTableDescription">
      Returns whether the view contains the specified object.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#createCursor()">createCursor</a>():<a href="../collections/IViewCursor.html">IViewCursor</a>
</div>
<div class="summaryTableDescription">
      Creates a new IViewCursor that works with this view.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#disableAutoUpdate()">disableAutoUpdate</a>():void</div>
<div class="summaryTableDescription">
      Prevents changes to the collection itself and items within the
   collection from being dispatched by the view.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#enableAutoUpdate()">enableAutoUpdate</a>():void</div>
<div class="summaryTableDescription">
      Enables auto-updating.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#itemUpdated()">itemUpdated</a>(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void</div>
<div class="summaryTableDescription">
      Notifies the view that an item has been updated.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#refresh()">refresh</a>():Boolean</div>
<div class="summaryTableDescription">
      Applies the sort and filter to the view.</div>
</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:collectionChange">collectionChange</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched when the ICollectionView has been updated in some way.</td><td class="summaryTableOwnerCol">ICollectionView</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="filterFunction"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">filterFunction</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>filterFunction:Function</code>&nbsp;&nbsp;[read-write]<p>
      A function that the view will use to eliminate items that do not
      match the function's criteria.
   A filterFunction is expected to have the following signature:
     <pre>f(item:Object):Boolean</pre>
     where the return value is <code>true</code> if the specified item
   should remain in the view.
        </p><p>If a filter is unsupported, Flex throws an error when accessing
      this property.
      You must call <code>refresh()</code> after setting the
   <code>filterFunction</code> property for the view to update.</p>
      <p>Note: The Flex implementations of ICollectionView retrieve all
   items from a remote location before executing the filter function.
   If you use paging, apply the filter to the remote collection before
   you retrieve the data.</p>
        <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get filterFunction():Function</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set filterFunction(value:Function):void</code>
<br>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../collections/ICollectionView.html#refresh()" target="">refresh()</a>
</div>
</div>
<a name="length"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>length:int</code>&nbsp;&nbsp;[read-only]<p>
      The number of items in this view.
   0 means no items, while -1 means that the length is unknown.
     </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():int</code>
<br>
</div>
<a name="sort"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sort</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>sort:<a href="../collections/Sort.html">Sort</a></code>&nbsp;&nbsp;[read-write]<p>
      The Sort that will be applied to the ICollectionView.
   Setting the sort does not automatically refresh the view,
   so you must call the <code>refresh()</code> method
   after setting this property.
      If sort is unsupported an error will be thrown when accessing
      this property.
     </p><p>Note: The Flex implementations of ICollectionView retrieve all
   items from a remote location before executing a sort.
   If you use paging with a sorted list, apply the sort to the remote
   collection before you retrieve the data.</p>
        <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get sort():<a href="../collections/Sort.html">Sort</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set sort(value:<a href="../collections/Sort.html">Sort</a>):void</code>
<br>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../collections/ICollectionView.html#refresh()" target="">refresh()</a>
</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="contains()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contains</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function contains(item:Object):Boolean</code><p>
      Returns whether the view contains the specified object.
   Unlike the <code>IViewCursor.find<i>xxx</i></code> methods,
   this search is succesful only if it finds an item that exactly
   matches the parameter.
      If the view has a filter applied to it this method may return
   <code>false</code> even if the underlying collection
   does contain the item.
           </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:Object</code> &mdash; The object to look for.
        </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; true if the ICollectionView, after applying any filter,
      contains the item; false otherwise.
     </td>
</tr>
</table>
</div>
<a name="createCursor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">createCursor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function createCursor():<a href="../collections/IViewCursor.html">IViewCursor</a></code><p>
      Creates a new IViewCursor that works with this view.
           </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../collections/IViewCursor.html">IViewCursor</a></code> &mdash; 
                        A new IViewCursor implementation.
          
                        
                     </td>
</tr>
</table>
</div>
<a name="disableAutoUpdate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">disableAutoUpdate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function disableAutoUpdate():void</code><p>
      Prevents changes to the collection itself and items within the
   collection from being dispatched by the view.
   Also prevents the view from updating the positions of items
   if the positions change in the collection.
   The changes will be queued and dispatched appropriately
   after <code>enableAutoUpdate</code> is called.
   If more events than updates to a single item occur,
   the view may end up resetting. 
   The <code>disableAutoUpdate</code> method acts cumulatively;
   the same number of calls to <code>enableAutoUpdate</code>
   are required for the view to dispatch events and refresh.
   Note that <code>disableAutoUpdate</code> only affects the
      individual view; edits may be detected on an individual
   basis by other views.
     </p></div>
<a name="enableAutoUpdate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">enableAutoUpdate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function enableAutoUpdate():void</code><p>
      Enables auto-updating.
   See <code>disableAutoUpdate</code> for more information.
        </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../collections/ICollectionView.html#disableAutoUpdate()" target="">disableAutoUpdate()</a>
</div>
</div>
<a name="itemUpdated()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">itemUpdated</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void</code><p>
      Notifies the view that an item has been updated.
   This method is useful if the contents of the view do not implement
   <code>IPropertyChangeNotifier</code>.
   If the call to this method includes a <code>property</code> parameter,
   the view may be able to optimize its notification mechanism.
      Otherwise it may choose to simply refresh the whole view.
           </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:Object</code> &mdash; The item within the view that was updated.
        </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">property</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The name of the property that was updated.
        </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">oldValue</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The old value of that property. (If property
   was null, this can be the old value of the item.).
        </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">newValue</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The new value of that property. (If property
   was null, there's no need to specify this as the item is assumed
   to be the new value.)
           </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../events/CollectionEvent.html" target="">mx.events.CollectionEvent</a>
<br>
<a href="../core/IPropertyChangeNotifier.html" target="">mx.core.IPropertyChangeNotifier</a>
<br>
<a href="../events/PropertyChangeEvent.html" target="">mx.events.PropertyChangeEvent</a>
</div>
</div>
<a name="refresh()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">refresh</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function refresh():Boolean</code><p>
      Applies the sort and filter to the view.
   The ICollectionView does not detect changes to a sort or
   filter automatically, so you must call the <code>refresh()</code>
   method to update the view after setting the <code>sort</code> 
   or <code>filterFunction</code> property.
   If your ICollectionView implementation also implements
   the IMXMLObject interface, you should to call the
   <code>refresh()</code> method from your <code>initialized()</code>
   method.
        </p><p>Returns <code>true</code> if the refresh was successful
   and <code>false</code> if the sort is not yet complete
   (e.g., items are still pending).
   A client of the view should wait for a CollectionEvent event
   with the <code>CollectionEventKind.REFRESH</code> <code>kind</code>
   property to ensure that the <code>refresh()</code> operation is
   complete.</p>
           <p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if the refresh() was complete,
   <code>false</code> if the refresh() is incomplete.
     </td>
</tr>
</table>
</div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:collectionChange"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">collectionChange</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../events/CollectionEvent.html"><code>mx.events.CollectionEvent</code></a>
<br>
<span class="label">CollectionEvent.type property = </span><a href="../events/CollectionEvent.html#COLLECTION_CHANGE"><code>mx.events.CollectionEvent.COLLECTION_CHANGE</code></a>
<br><p>
  Dispatched when the ICollectionView has been updated in some way.
   </p><p>
      The CollectionEvent.COLLECTION_CHANGE constant defines the value of the
      <code>type</code> property of the event object for an event that is
      dispatched when a collection has changed.
           </p><p>The properties of the event object have the following values.
      Not all properties are meaningful for all kinds of events.
   See the detailed property descriptions for more information.</p>
      <table class="innertable">
         <tr><th>Property</th><th>Value</th></tr>
         <tr><td><code>bubbles</code></td><td>false</td></tr>
         <tr><td><code>cancelable</code></td><td>false</td></tr>
         <tr><td><code>currentTarget</code></td><td>The Object that defines the
           event listener that handles the event. For example, if you use
           <code>myButton.addEventListener()</code> to register an event listener,
           myButton is the value of the <code>currentTarget</code>. </td></tr>
         <tr><td><code>items</code></td><td>An Array of objects with
           information about the items affected by the event.
     The contents of this field depend on the event kind;
        for details see the <code>items</code> property</td></tr>
         <tr><td><code>kind</code></td><td>The kind of event.
           The valid values are defined in the CollectionEventKind 
        class as constants.</td></tr>
         <tr><td><code>location</code></td><td>Location within the target collection
             of the item(s) specified in the <code>items</code> property.</td></tr>
         <tr><td><code>oldLocation</code></td><td>the previous location in the collection
             of the item specified in the <code>items</code> property.</td></tr>
         <tr><td><code>target</code></td><td>The Object that dispatched the event;
           it is not always the Object listening for the event.
           Use the <code>currentTarget</code> property to always access the
           Object listening for the event.</td></tr>
         <tr><td><code>type</code></td><td>CollectionEvent.COLLECTION_CHANGE</td></tr>
      </table>
           </div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
